-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added endpoints for events table #28
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @antsuh1028 @dnarimot, there are a few edits that need to be made. We'll go over this at the sprint meeting tomorrow so don't worry about it yet!
Double-check this file for the input and output data for each request.
Todo:
- Remember to export the router for use in app.ts and that way we can have the endpoints of the router in app.ts already start with '/events' and then in events.js the endpoint can just be /
- You can also access our database and test the routes on Postman.
- Fix "POST /events"
- Only return the ID of event created, not all data
- Additionally, description is optional, so ensure that the POST request works even if that is null. - Fix "PUT /events"
- The logic for the endpoint is right, but we need to ensure that if there are NULL values passed in that the PUT doesn't directly update the table with NULL, but instead keeps the old value.
Okay, I got the changes to work, tested in Postman, thank you. |
Thank you! Will take another look this weekend. |
TL's To-do
|
Description
Added the api endpoints
Screenshots/Media
Issues
Closes #21